<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<c:set var="ctx" value="${pageContext.request.contextPath }"/>
<%@taglib  prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8" />
	<title>低值资产管理系统</title>
	<meta http-equiv="X-UA-Compatible" content="IE=edge">
	<meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
	<meta name="MobileOptimized" content="320">
	<!-- BEGIN GLOBAL MANDATORY STYLES -->          
	<link href="${ctx}/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/plugins/uniform/css/uniform.default.css" rel="stylesheet" type="text/css"/>
	<!-- END GLOBAL MANDATORY STYLES -->
	<!-- BEGIN THEME STYLES --> 
	<link href="${ctx}/assets/css/style-metronic.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/style.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/style-responsive.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/plugins.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/themes/light.css" rel="stylesheet" type="text/css"/>
	<link href="${ctx}/assets/css/custom.css" rel="stylesheet" type="text/css"/>
	<link rel="stylesheet" type="text/css" href="${ctx}/assets/plugins/bootstrap-daterangepicker/daterangepicker-bs3.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/assets/plugins/bootstrap-datetimepicker/css/datetimepicker.css" />
	<link rel="stylesheet" type="text/css" href="${ctx}/assets/plugins/jquery-multi-select/css/multi-select.css" />
	<link href="${ctx }/css/custom.css" rel="stylesheet" type="text/css"/>

	<link href="${ctx}/frontend/assets/plugins/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
   
   	<link href="${ctx}/frontend/assets/css/pages/portfolio.css" rel="stylesheet" type="text/css"/>

	<link href="${ctx}/frontend/assets/plugins/fancybox/source/jquery.fancybox.css" rel="stylesheet" />              
    <link rel="stylesheet" href="${ctx}/frontend/assets/plugins/revolution_slider/css/rs-style.css" media="screen">
    <link rel="stylesheet" href="${ctx}/frontend/assets/plugins/revolution_slider/rs-plugin/css/settings.css" media="screen"> 
    <link href="${ctx}/frontend/assets/plugins/bxslider/jquery.bxslider.css" rel="stylesheet" />       
	<!-- END THEME STYLES -->	
	<link rel="shortcut icon" href="favicon.ico" />
</head>
<!-- END HEAD -->
<!-- BEGIN BODY -->
<body class="page-header-fixed page-full-width">
	<!-- BEGIN HEADER -->   
	<%@include file="../include/header.jsp" %>
	<!-- END HEADER -->
	
	<!-- BEGIN CONTAINER -->
	<div class="page-container">
		<div class="page-content">
			
			<!-- END BEGIN STYLE CUSTOMIZER -->            
			<!-- BEGIN PAGE HEADER-->
			<div class="row">
				<div class="col-md-12">
					<!-- BEGIN PAGE TITLE & BREADCRUMB-->
					<h3 class="page-title">
						物资报废详情
					</h3>
					
					<!-- END PAGE TITLE & BREADCRUMB-->
				</div>
			</div>
			<!-- END PAGE HEADER-->
			<!-- BEGIN PAGE CONTENT-->          
			<div class="row">
				<div class="col-md-12">
					
					<!-- BEGIN SAMPLE TABLE PORTLET-->
					<div class="portlet box green">
						<div class="portlet-title">
							<div class="caption"><i class="fa fa-cogs"></i>物资报废详细信息</div>
							<div class="tools">
								<a href="javascript:;" class="collapse"></a>
							</div>
						</div>
						<div class="portlet-body flip-scroll">							
							<form class="form-horizontal" role="form">								
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">申请日期</label>
										<label class="col-md-4 control-label" style="text-align:left;"><fmt:formatDate value="${baoFei.shenQingRQ }" pattern="yyyy-MM-dd"/></label>
										<label class="col-md-2 control-label">申请人</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.user.name }</label>			
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">报废原因</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.baoFeiYY }</label>
										<label class="col-md-2 control-label">处理方式</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.chuLiFS }</label>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">回收单位</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.huiShouDW }</label>
										<label class="col-md-2 control-label">回收金额</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.huiShouJE }</label>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">物资名称</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.wuZi.wuZiMC }</label>
										<label class="col-md-2 control-label">物资类别</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.wuZi.wuZiLB.leibieMC }</label>
									</div>
								</div>								
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">品牌</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.wuZi.pinPai }</label>
										<label class="col-md-2 control-label">规格型号</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.wuZi.guiGeXH }</label>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">资产编号</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.wuZi.ziChanBH }</label>
										<label class="col-md-2 control-label">产品序列号</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.wuZi.chanPinXLH }</label>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">会议纪要</label>
										<label class="col-md-4 control-label" style="text-align:left;">
											<c:forEach items="${jiYaoList }" var="u">
												<a href="${ctx }/wuzi/downloadFile.do?id=${u.id}&type=6">${u.ysWJM }</a>&nbsp;&nbsp;&nbsp;&nbsp;
											</c:forEach>
										</label>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">附件</label>
										<label class="col-md-4 control-label" style="text-align:left;">
											<c:forEach items="${fuJianList }" var="u">
												<a href="${ctx }/wuzi/downloadFile.do?id=${u.id}&type=7">${u.ysWJM }</a>&nbsp;&nbsp;&nbsp;&nbsp;
											</c:forEach>
										</label>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">申请状态</label>
										<label class="col-md-4 control-label" style="text-align:left;">${baoFei.huanJie.huanJieMC }</label>
									</div>
								</div>
								<div class="row">
									<div class="form-group">
										<label class="col-md-2 control-label">下一步办理人</label>
										<label class="col-md-8 control-label" style="text-align:left;">
											<c:forEach items="${xiaYiBuR }" var="u">
												${u.name }&nbsp;&nbsp;
											</c:forEach>
										</label>
									</div>
								</div>																		
							</form>
						</div>
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-md-12">
					<div class="tabbable tabbable-custom boxless">
						<ul class="nav nav-tabs">
							<li class="active"><a href="#tab_0" data-toggle="tab">审批流程</a></li>							
						</ul>
						<div class="tab-content">
							<div class="tab-pane active" id="tab_0">
								<div class="portlet box blue">
									<div class="portlet-title">
										<div class="caption"><i class="fa fa-reorder"></i>审批流程</div>
										<div class="tools">
											<a href="javascript:;" class="collapse"></a>	
										</div>
									</div>
									<div class="portlet-body form">
										<!-- BEGIN FORM-->
										<form action="#" class="form-horizontal">											
											<div class="form-body">
												<div class="portlet-body flip-scroll">
													<table class="table table-bordered table-striped table-condensed flip-content">
														<thead class="flip-content">
															<tr>																
																<th>审批日期</th>																
																<th>审批人</th>
																<th>审批类型</th>
																<th>审批意见</th>
																<th>审批环节</th>
																<th>操作</th>
															</tr>
														</thead>
														<tbody>
															<c:forEach items="${baoFeiJLList }" var="u">
																<tr>
																	<td><fmt:formatDate value="${u.caoZuoRQ }" pattern="yyyy-MM-dd HH:mm:ss"/></td>
																	<td>${u.user.name }</td>
																	<td>${u.piFuLX }</td>
																	<td>${u.piFuNR }</td>
																	<td>${u.huanJie.huanJieMC }</td>
																	<td>
																		<shiro:hasRole name="低值管理员">
																			<c:if test="${u.huanJie.id==706 }">
																				<a href="javascript:daYinDanJu('${u.baoFei.id}')" class="btn default btn-xs green-stripe">打印审批单</a>
																			</c:if>
																		</shiro:hasRole>	
																	</td>
																</tr>
															</c:forEach>
														</tbody>
													</table>
												</div>
											</div>
										</form>
										<!-- END FORM--> 
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
			<!-- END PAGE CONTENT-->
		</div>
		<!-- END PAGE -->
	</div>
	<!-- END CONTAINER -->
	<shiro:hasRole name="低值管理员">
	<div id="div1" style="display:none">  
	  <table width="100%" border="0">	  
	  <tr>
	    <td colspan="4" align="center"><strong>物资报废审批单</strong></td>
	  </tr>
	  <tr>
	    <td width="25%" align="left"></td>
	    <td colspan="2" align="center" id="danJuRQ"></td>
	    <td width="25%" align="center">字第&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</td>
	  </tr>
	</table>
	</div>
	<div id="div2" style="display:none">
	<table width="100%" border="1" align="center" cellspacing="1" >
	  <tr>
	    <th width="25%">物资编号</th>
	    <td width="25%" id="bFziChanBH"></td>
	    <th width="25%">资产编码</th>
	    <td width="25%" id="bFziChanBM"></td>	    
	  </tr>
	  <tr>
	    <th width="25%">物资名称</th>
	    <td width="25%" id="bFwuZiMC"></td>
	    <th width="25%">购买日期</th>
	    <td width="25%" id="bFgouMaiRQ"></td>
	  </tr>
	  <tr>
	    <th width="25%">开始计提日期</th>
	    <td width="25%" id="bFkaiShiJiTiRQ"></td>
	    <th width="25%">物资原值</th>
	    <td width="25%" id="bFwuZiYZ"></td>
	  </tr>
	  <tr>
	    <%--<th width="25%">物资净值</th>
	    <td width="25%" id="bFwuZiJingZhi"></td>--%>
	    <th width="25%">累计折旧金额</th>
	    <td width="25%" id="bFleiJiZheJiuJE"></td>
	  </tr>
	  <%--<tr>
	  	<th width="25%">折旧月限</th>
	    <td width="25%" id="bFzheJiuYX"></td>
	    <th width="25%">已折旧月数</th>
	    <td width="25%" id="bFyiZheJiuYS"></td>
	    
	  </tr>--%>
	  <tr>
	    <th width="25%">使用部门</th>
	    <td width="25%" id="bFshiYongBM"></td>
	    <th width="25%">使用人</th>
	    <td width="25%" id="bFshiYongR"></td>
	  </tr>
	  <tr>
	    <th>线上审批人</th>
	    <td colspan="3" id="xianShangShenPiR"></td>	    
	  </tr>
	  <tr>	    
	    <td rowspan="4" colspan="4"><br><br><br><br></td>
	  </tr>
	</table>
	</div>	
	<object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width=0 height=0> 
		<embed id="LODOP_EM" type="application/x-print-lodop" width=0 height=0 pluginspage="install_lodop32.exe"></embed>
	</object>
	</shiro:hasRole>
	<!-- BEGIN FOOTER -->
	<%@include file="../include/footer.jsp" %>
	<!-- END FOOTER -->
	<!-- BEGIN JAVASCRIPTS(Load javascripts at bottom, this will reduce page load time) -->
	<!-- BEGIN CORE PLUGINS -->   
	<!--[if lt IE 9]>
	<script src="${ctx}/assets/plugins/respond.min.js"></script>
	<script src="${ctx}/assets/plugins/excanvas.min.js"></script> 
	<![endif]-->   
	<script src="${ctx}/assets/plugins/jquery-1.10.2.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/jquery-migrate-1.2.1.min.js" type="text/javascript"></script>    
	<script src="${ctx}/assets/plugins/bootstrap/js/bootstrap.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/bootstrap-hover-dropdown/twitter-bootstrap-hover-dropdown.min.js" type="text/javascript" ></script>
	<script src="${ctx}/assets/plugins/jquery-slimscroll/jquery.slimscroll.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/jquery.blockui.min.js" type="text/javascript"></script>  
	<script src="${ctx}/assets/plugins/jquery.cookie.min.js" type="text/javascript"></script>
	<script src="${ctx}/assets/plugins/uniform/jquery.uniform.min.js" type="text/javascript" ></script>

	<script src="${ctx}/assets/scripts/form-components.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-datetimepicker/js/bootstrap-datetimepicker.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/clockface/js/clockface.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-daterangepicker/moment.min.js"></script>
	<script type="text/javascript" src="${ctx}/assets/plugins/bootstrap-daterangepicker/daterangepicker.js"></script>
	<script type="text/javascript" src="${ctx}/frontend/assets/plugins/revolution_slider/rs-plugin/js/jquery.themepunch.plugins.min.js"></script>
    <script type="text/javascript" src="${ctx}/frontend/assets/plugins/revolution_slider/rs-plugin/js/jquery.themepunch.revolution.min.js"></script> 
    <script type="text/javascript" src="${ctx}/frontend/assets/plugins/bxslider/jquery.bxslider.min.js"></script>    
    <script src="${ctx}/frontend/assets/scripts/index.js"></script>
	<!-- END CORE PLUGINS -->
	<script src="${ctx}/assets/scripts/app.js"></script>
	<script type="text/javascript" src="${ctx }/lodop/LodopFuncs.js"></script>
	<script>
		jQuery(document).ready(function() {       
		   // initiate layout and plugins
		   App.init();		   
		   /* App.initBxSlider();
           Index.initRevolutionSlider();
		   FormComponents.init(); */

		});
		<shiro:hasRole name="低值管理员">
		var LODOP=getLodop(document.getElementById('LODOP_OB'),document.getElementById('LODOP_EM'));
		var iRadioValue=1;
		function PreviewMytable(){
			LODOP=getLodop();  
			LODOP.PRINT_INIT("打印控件功能演示_Lodop功能_预览打印表格");
			LODOP.ADD_PRINT_TABLE("10mm","10mm","190mm","50mm",document.getElementById("div1").innerHTML);
	    	LODOP.ADD_PRINT_TABLE("25mm","10mm","190mm","100mm",document.getElementById("div2").innerHTML);
			LODOP.SET_PRINT_STYLEA(0,"TableHeightScope",iRadioValue);
			LODOP.PREVIEW();
		};
		function check(thisValue){
		  iRadioValue=thisValue;
		}
		
		var daYinDanJu=function(id){			
			$.ajax({
				type:"POST",
				data:{
					"id":id
				},
				url:"${ctx}/wuzi/baoFeiDanJu.do",
				dataType:"json",
				success:function(data){
					$('#danJuRQ').html(data.danJuRQ);
					$('#bFziChanBH').html(data.bFziChanBH);
					$('#bFziChanBM').html(data.bFziChanBM);
					$('#bFwuZiMC').html(data.bFwuZiMC);
					$('#bFgouMaiRQ').html(data.bFgouMaiRQ);
					$('#bFkaiShiJiTiRQ').html(data.bFkaiShiJiTiRQ);
					$('#bFwuZiYZ').html(data.bFwuZiYZ);
					$('#bFwuZiJingZhi').html(data.bFwuZiJingZhi);
					$('#bFleiJiZheJiuJE').html(data.bFleiJiZheJiuJE);
					$('#bFzheJiuYX').html(data.bFzheJiuYX);
					$('#bFyiZheJiuYS').html(data.bFyiZheJiuYS);					
					$('#bFshiYongBM').html(data.bFshiYongBM);
					$('#bFshiYongR').html(data.bFshiYongR);
					$('#xianShangShenPiR').html(data.xianShangShenPiR);
					PreviewMytable();
				}
			});
		}		
		</shiro:hasRole>
	</script>
</body>
<!-- END BODY -->
</html>